﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>

<%
    
        
    List<SelectListItem> displayLocales = new List<SelectListItem>();
    
    List<System.Globalization.CultureInfo> cultures = System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes.SpecificCultures).ToList();
    cultures.Sort(AMSManager.CompareCultures);

    foreach (System.Globalization.CultureInfo ci in cultures)
    {
        string name = string.Format("{0}. {1}", ci.IetfLanguageTag, ci.EnglishName);
        //ListItem item2 = new ListItem(name, ci.IetfLanguageTag);
        displayLocales.Add(new SelectListItem { Text = name, Value = ci.IetfLanguageTag });
    }
       %>
<%: Html.DropDownList("", new SelectList(displayLocales, "Value", "Text", Model))%>